﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace gChartSharp.ChartParams
{
    public class BarChartZeroLineParam : ParamBase<float>, IRenderable
    {
        public override string Name { get { return "chp"; } }

        /// <summary>
        /// A floating point value from 0.0—1.0, inclusive, where 0.0 is the bottom of the axis, 
        /// and 1.0 is top of the axis. Bars will be redrawn to show the difference between this and their value.
        /// </summary>
        protected override void ValidateParams()
        {
            Params.ForEach((float f) =>
            {
                if (f < 0.0 || f > 1.0)
                    throw new ParamException("Zero Line value must be between 0.0 and 1.0, inclusive.");
            });
        }
    }
}
